Skip to content

Conversation

@m-y-mo
Copy link
Contributor

@m-y-mo m-y-mo commented Jan 6, 2026

No description provided.

@m-y-mo m-y-mo requested a review from p- as a code owner January 6, 2026 10:38
Copilot AI review requested due to automatic review settings January 6, 2026 10:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request attempts to normalize GitHub repository owner and repository names to lowercase across various file viewer and resource management modules. However, this change introduces critical bugs that will break the functionality of all affected functions.

  • Adds .lower() calls to owner and repo parameters in 13 functions across 3 files
  • Affects both GitHub API interactions and local file system operations
  • Applies the same transformation pattern consistently across all modified functions

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 13 comments.

File Description
src/seclab_taskflows/mcp_servers/gh_file_viewer.py Adds lowercase conversion for owner/repo in 6 GitHub API functions (fetch_file_from_gh, get_file_lines_from_gh, search_file_from_gh, search_files_from_gh, list_directory_from_gh, search_repo_from_gh)
src/seclab_taskflows/mcp_servers/local_file_viewer.py Adds lowercase conversion for owner/repo in 5 local file operations (fetch_file_content, get_file_lines, list_files, list_files_non_recursive, search_repo)
src/seclab_taskflows/mcp_servers/local_gh_resources.py Adds lowercase conversion for owner/repo in 2 repository management functions (fetch_repo_from_gh, clear_local_repo)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +206 to +207
owner = owner.lower()
repo = repo.lower()
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting owner and repo names to lowercase will break file path lookups for repositories that were downloaded with their original case. The file system paths are constructed using the original case, so lowercasing these parameters will cause path mismatches and file-not-found errors.

Copilot uses AI. Check for mistakes.
Comment on lines +129 to +130
owner = owner.lower()
repo = repo.lower()
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting owner and repo names to lowercase will cause API failures for repositories with uppercase characters in their names. GitHub's API is case-sensitive and requires the exact case of the repository owner and name. For example, calling the API with "github/copilot" when the actual repository is "GitHub/Copilot" will result in a 404 error.

Suggested change
owner = owner.lower()
repo = repo.lower()

Copilot uses AI. Check for mistakes.
Comment on lines +205 to +206
owner = owner.lower()
repo = repo.lower()
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting owner and repo names to lowercase will cause API failures for repositories with uppercase characters in their names. GitHub's API is case-sensitive and requires the exact case of the repository owner and name. For example, calling the API with "github/copilot" when the actual repository is "GitHub/Copilot" will result in a 404 error.

Copilot uses AI. Check for mistakes.
Comment on lines +253 to +254
owner = owner.lower()
repo = repo.lower()
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting owner and repo names to lowercase will cause API failures for repositories with uppercase characters in their names. GitHub's API is case-sensitive and requires the exact case of the repository owner and name. For example, calling the API with "github/copilot" when the actual repository is "GitHub/Copilot" will result in a 404 error.

Copilot uses AI. Check for mistakes.
Comment on lines +277 to +278
owner = owner.lower()
repo = repo.lower()
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting owner and repo names to lowercase will cause API failures for repositories with uppercase characters in their names. GitHub's API is case-sensitive and requires the exact case of the repository owner and name. For example, calling the API with "github/copilot" when the actual repository is "GitHub/Copilot" will result in a 404 error.

Copilot uses AI. Check for mistakes.
Comment on lines +180 to +181
owner = owner.lower()
repo = repo.lower()
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting owner and repo names to lowercase will cause API failures for repositories with uppercase characters in their names. GitHub's API is case-sensitive and requires the exact case of the repository owner and name. For example, calling the API with "github/copilot" when the actual repository is "GitHub/Copilot" will result in a 404 error.

Copilot uses AI. Check for mistakes.
Comment on lines +112 to +113
owner = owner.lower()
repo = repo.lower()
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting owner and repo names to lowercase will break file path lookups for repositories that were downloaded with their original case. The file system paths are constructed using the original case, so lowercasing these parameters will cause path mismatches and file-not-found errors.

Copilot uses AI. Check for mistakes.
Comment on lines +114 to +115
owner = owner.lower()
repo = repo.lower()
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting owner and repo names to lowercase will break file path lookups for repositories that were downloaded with their original case. The file system paths are constructed using the original case, so lowercasing these parameters will cause path mismatches and file-not-found errors.

Suggested change
owner = owner.lower()
repo = repo.lower()

Copilot uses AI. Check for mistakes.
Comment on lines +139 to +140
owner = owner.lower()
repo = repo.lower()
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting owner and repo names to lowercase will break file path lookups for repositories that were downloaded with their original case. The file system paths are constructed using the original case, so lowercasing these parameters will cause path mismatches and file-not-found errors.

Copilot uses AI. Check for mistakes.
Comment on lines +185 to +186
owner = owner.lower()
repo = repo.lower()
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting owner and repo names to lowercase will break file path lookups for repositories that were downloaded with their original case. The file system paths are constructed using the original case, so lowercasing these parameters will cause path mismatches and file-not-found errors.

Copilot uses AI. Check for mistakes.
@kevinbackhouse
Copy link
Contributor

Interesting. Copilot seems convinced that repo names are case sensitive. In practice, that seems to be not true, but I can't find any documentation to confirm it.

@m-y-mo m-y-mo merged commit cf3e8d1 into main Jan 6, 2026
15 checks passed
@m-y-mo m-y-mo deleted the fix_cases branch January 6, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants